package _0_语法._4_循环._1_单循环;

public class _2_求1加2加到100 {

    public static void main(String[] args) {
        // 和变量
        int sum = 0;

        for (int i = 1; i <= 100; i++){
            sum = sum + i;
        }

        System.out.println("1+2+3+...+100=" + sum);
    }
}
